<script>
export default {
    data() {
        return {
            count: 0
        }
    },

    methods: {
        addCount(e) {
            console.log(e, e.target);
            e.target.innerHTML = "add" + this.count;
            this.count++;
        },
        addCount2(msg, e) {
            console.log(msg, e);
            this.count++;
        }
    }

}
</script>

<template>
    <h2>eventdemo2</h2>
    <button @click="count++">+1</button>
    <br>
    <button @click="addCount">+1</button>
    <br>
    <button @click="addCount2('hello')">+1</button>
    <button @click="addCount2('hello', $event)">+1</button>
    <p>{{ count }}</p>
</template>
